<%= form_tag :controller=>'report', :action => 'updateincumbent', :id=>@incumbent.id%>
<table width="680" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td colspan="3" class="biggray"><strong>所在公司信息</strong></td>
	</tr>
	<tr bgcolor="3366CC">
		<td colspan="3"></td>
	</tr>
	<tr>
		<td colspan="3">&nbsp;</td>
	</tr>
	<tr>
		<td colspan="3">
		<table width="600" border="0" align="left" cellpadding="0"
			cellspacing="0" class="medblack">
			<tr>
				<td width="130">&nbsp;</td>
				<td colspan="4">&nbsp;</td>
			</tr>
			<tr>
				<td rowspan="8" valign="top" align="center">
				<table width="61" height="61">
					<tr>
						<td><%=showpicture(@company)%></td>
					</tr>
					<tr>
						<td align="center"><%=uploadpicture(@company)%></td>
					</tr>
				</table>
				</td>
				<td width="75" class="medgray"><strong> 公司名称：</strong></td>
				<td><%=h(@company.cname)%></td>
				<td width="75" class="medgray"><strong> 样本数量：</strong></td>
				<td><%=link_to @company.incumbent_number.to_s+"个", :controller=>"report",:action=>"listcompanyincumbent",:id=>@company.id %>
				</td>
			</tr>
			<tr>
				<td colspan="4">&nbsp;</td>
			</tr>
			<tr>
				<td width="75" class="medgray"><strong> 公司地址：</strong></td>
				<td colspan="3"><%=h(@company.address)%></td>
			</tr>
			<tr>
				<td colspan="4">&nbsp;</td>
			</tr>
			<tr class="Maintext">
				<td class="medgray" width="75"><strong> 所在行业：</strong></td>
				<td width="250"><%=@company.Industry.cname%></td>
				<td class="medgray" width="75"><strong> 公司人数：</strong></td>
				<td width="100"><%=Company::PAYMENT_TYPES[@company.employee]%></td>
			</tr>
			<tr>
				<td colspan="4">&nbsp;</td>
			</tr>
			<tr class="Maintext">
				<td class="medgray" width="75"><strong> 公司性质：</strong></td>
				<td><%=@company.Entity.cname%></td>
				<td class="medgray" width="75"><strong> 内部级别：</strong></td>
				<td><%=@company.grade%> 级</td>
			</tr>
		</table>
		</td>
	</tr>
</table>
<table width="680" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td>
		<div id="infoList"></div>
		</td>
	</tr>
</table>


<table width="680" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<td colspan="2" class="biggray"><strong>提供职位样本</strong></td>
	</tr>
	<tr bgcolor="3366CC">
		<td colspan="2"></td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<td width="100" height="32" class="medblack">
		<li>样本名称：</li>
		</td>
		<td height="32"><%= text_field 'incumbent', 'ttitle',:size=>"35" , 
                                        :onMouseOver=>"this.style.backgroundColor = '#E5F0FF';",
                                        :onMouseOut=>"this.style.backgroundColor = '';"%></td>
	</tr>
	<tr>
		<td height="32" class="medblack">
		<li>月均收入：</li>
		</td>
		<td height="32"><%= text_field 'evaluator', 'salary',:size=>"10" , 
                                        :onMouseOver=>"this.style.backgroundColor = '#E5F0FF';",
                                        :onMouseOut=>"this.style.backgroundColor = '';"%></td>
	</tr>
	<tr>
		<td height="32" class="medblack">
		<li>所属职能：</li>
		</td>
		<td height="32"><%= @functions=Function.find(:all).map {|u| [u.cname, u.id] }
			select 'function', 'id',@functions,:selected=>@functions[@incumbent.Tposition.function_id-1]%>
		<%= observe_field(:function_id,:frequency => 0.5,:update => "position",:url => {:controller=>"index",:action => "postposition"}) %>
		</td>
	</tr>
	<tr>
		<td height="32" class="medblack">
		<li>所属职位：</li>
		</td>
		<td height="32" class="medgray" id="position"><%= @positions = Position.find(:all,:conditions=>["function_id=?",@incumbent.Tposition.function_id]).map {|u| [u.cname, u.id] }
			select 'incumbent', 'tposition_id',@positions%></td>
	</tr>
	<tr>
		<td height="32" class="medblack">
		<li>有效年份：</li>
		</td>
		<td height="32" class="medgray"><%= select 'incumbent', 'teffective_year', 2000..2008 %>&nbsp;年</td>
	</tr>
	<tr>
		<td height="32" class="medblack">
		<li>所在城市：</li>
		</td>
		<td height="32">
		<table width="200" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td width="100"><%= 
                	@regions=Region.find(:all).map {|u| [u.cname, u.id] }
                	select 'region', 'id',@regions,:selected=>@regions[@incumbent.Tcity.region_id-1]%>
				<%= observe_field(:region_id,:frequency => 0.5,:update => "city",:url => {:controller=>"index",:action => "postcity"})%>
				</td>
				<td width="100" class="medgray" id="city"><%= @cities = City.find(:all,:conditions=>["region_id=?",@incumbent.Tcity.region_id]).map {|u| [u.cname, u.id] }
					select 'incumbent', 'tcity_id',@cities%></td>
			</tr>
		</table>
		</td>
	</tr>
	<tr>
		<td height="32" class="medblack">
		<li>所属级别：</li>
		</td>
		<td height="32" class="medgray">
		<div id="rankList"><%= select 'incumbent', 'trank',1..@company.grade%></div>
		</td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
</table>
<%= submit_tag " 更 新 ",:onClick=>"if(confirm('更新后将删除该样本的职位报告，是否继续？'))return true;return false"%>
&nbsp;(&nbsp;
<a href="#" onclick="history.go(-1)">取消</a>
&nbsp;)
<%= end_form_tag %>
